package com.sg.dto.integration.app;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc TaskerIsPartakeEvaDto
 * @使用场景
 */
@Data
public class TaskerIsPartakeEvaDto extends BaseDto implements Serializable {

    /**
     * 虚拟组织成员ID
     */
    @ApiModelProperty("虚拟组织成员ID")
    private String virtualOrgMemberId;

    /**
     * 虚拟组织成员就职记录ID
     */
    @ApiModelProperty("虚拟组织成员就职记录ID")
    private String virtualOrgInductionRecordId;

    /**
     * 个人账号
     */
    @ApiModelProperty("个人账号")
    private String userId;

    /**
     * 组内职务名称
     */
    @ApiModelProperty("组内职务名称")
    private String virtualOrganizationPosition;

    /**
     * 是否上下级关系 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否上下级关系")
    private String isUpperLowerLevels;

    /**
     * 角色标识
     */
    @ApiModelProperty("角色标识")
    private String roleCode;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        TaskerIsPartakeEvaDto that = (TaskerIsPartakeEvaDto) o;
        return (
                virtualOrgMemberId == that.virtualOrgMemberId &&
                        virtualOrgInductionRecordId == that.virtualOrgInductionRecordId &&
                        userId == that.userId &&
                        virtualOrganizationPosition == that.virtualOrganizationPosition &&
                        isUpperLowerLevels == that.isUpperLowerLevels &&
                        roleCode == that.roleCode
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                virtualOrgMemberId,
                virtualOrgInductionRecordId,
                userId,
                virtualOrganizationPosition,
                isUpperLowerLevels,
                roleCode
        );
    }

}
